flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/state/StateBackendTestBase.java
/**
	 * Previously, it was possible to create partitioned state with
	 * <code>null</code> namespace. This test makes sure that this is
	 * prohibited now.
	 */
Previously, it was possible to create partitioned state with
null namespace. This test makes sure that this is
prohibited now.
Previously it was possible to create partitioned state with null namespace . This test makes sure that this is prohibited now .
@Test
	public void testRequireNonNullNamespace() throws Exception {
		final AbstractKeyedStateBackend<Integer> backend = createKeyedBackend(IntSerializer.INSTANCE);
		ValueStateDescriptor<IntValue> kvId = new ValueStateDescriptor<>("id", IntValue.class, new IntValue(-1));
		try {
			backend.getPartitionedState(null, VoidNamespaceSerializer.INSTANCE, kvId);
			fail("Did not throw expected NullPointerException");
		} catch (NullPointerException ignored) {
		}
		try {
			backend.getPartitionedState(VoidNamespace.INSTANCE, null, kvId);
			fail("Did not throw expected NullPointerException");
		} catch (NullPointerException ignored) {
		}
		try {
			backend.getPartitionedState(null, null, kvId);
			fail("Did not throw expected NullPointerException");
		} catch (NullPointerException ignored) {
		}
		backend.dispose();
	}
@ Test public void testRequireNonNullNamespace ( ) throws Exception { final AbstractKeyedStateBackend < Integer > backend = createKeyedBackend ( IntSerializer . INSTANCE ) ; ValueStateDescriptor < IntValue > kvId = new ValueStateDescriptor < > ( "id" , IntValue . class , new IntValue ( - 1 ) ) ; try { backend . getPartitionedState ( null , VoidNamespaceSerializer . INSTANCE , kvId ) ; fail ( "Did not throw expected NullPointerException" ) ; } catch ( NullPointerException ignored ) { } try { backend . getPartitionedState ( VoidNamespace . INSTANCE , null , kvId ) ; fail ( "Did not throw expected NullPointerException" ) ; } catch ( NullPointerException ignored ) { } try { backend . getPartitionedState ( null , null , kvId ) ; fail ( "Did not throw expected NullPointerException" ) ; } catch ( NullPointerException ignored ) { } backend . dispose ( ) ; }
Previously, it was possible to create partitioned state with
 <code>null</code> namespace.
Previously it was possible to create partitioned state with <code > null< / code > namespace .