Skip to content

Commit 8c78d7f

Browse files
committed
---
yaml --- r: 15 b: refs/heads/master c: 9724180 h: refs/heads/master i: 13: e4e0f11 11: 47fe212 7: 5a317e2 v: v3
1 parent db8788c commit 8c78d7f

12 files changed

Lines changed: 306 additions & 80 deletions

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 5a47498a0a87bc3a6c1cee97afd5e6a981d7e6f2
2+
refs/heads/master: 9724180a570a4865fa16e599d9434bc9b74b1416

trunk/.classpath

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
<attribute name="maven.pomderived" value="true"/>
1818
</attributes>
1919
</classpathentry>
20-
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
21-
<attributes>
22-
<attribute name="maven.pomderived" value="true"/>
23-
</attributes>
24-
</classpathentry>
2520
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
2621
<attributes>
2722
<attribute name="maven.pomderived" value="true"/>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
filesCopiedToWebInfLib=
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
#FindBugs User Preferences
2+
#Wed Nov 19 14:11:27 PST 2014
3+
cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud
4+
detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true
5+
detectorAtomicityProblem=AtomicityProblem|true
6+
detectorBadAppletConstructor=BadAppletConstructor|false
7+
detectorBadResultSetAccess=BadResultSetAccess|true
8+
detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true
9+
detectorBadUseOfReturnValue=BadUseOfReturnValue|true
10+
detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true
11+
detectorBooleanReturnNull=BooleanReturnNull|true
12+
detectorCallToUnsupportedMethod=CallToUnsupportedMethod|false
13+
detectorCheckExpectedWarnings=CheckExpectedWarnings|false
14+
detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true
15+
detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true
16+
detectorCheckTypeQualifiers=CheckTypeQualifiers|true
17+
detectorCloneIdiom=CloneIdiom|true
18+
detectorComparatorIdiom=ComparatorIdiom|true
19+
detectorConfusedInheritance=ConfusedInheritance|true
20+
detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true
21+
detectorCrossSiteScripting=CrossSiteScripting|true
22+
detectorDefaultEncodingDetector=DefaultEncodingDetector|true
23+
detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true
24+
detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true
25+
detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true
26+
detectorDontUseEnum=DontUseEnum|true
27+
detectorDroppedException=DroppedException|true
28+
detectorDumbMethodInvocations=DumbMethodInvocations|true
29+
detectorDumbMethods=DumbMethods|true
30+
detectorDuplicateBranches=DuplicateBranches|true
31+
detectorEmptyZipFileEntry=EmptyZipFileEntry|false
32+
detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true
33+
detectorExplicitSerialization=ExplicitSerialization|true
34+
detectorFinalizerNullsFields=FinalizerNullsFields|true
35+
detectorFindBadCast2=FindBadCast2|true
36+
detectorFindBadForLoop=FindBadForLoop|true
37+
detectorFindCircularDependencies=FindCircularDependencies|false
38+
detectorFindDeadLocalStores=FindDeadLocalStores|true
39+
detectorFindDoubleCheck=FindDoubleCheck|true
40+
detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true
41+
detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true
42+
detectorFindFinalizeInvocations=FindFinalizeInvocations|true
43+
detectorFindFloatEquality=FindFloatEquality|true
44+
detectorFindHEmismatch=FindHEmismatch|true
45+
detectorFindInconsistentSync2=FindInconsistentSync2|true
46+
detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true
47+
detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true
48+
detectorFindMaskedFields=FindMaskedFields|true
49+
detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true
50+
detectorFindNakedNotify=FindNakedNotify|true
51+
detectorFindNonShortCircuit=FindNonShortCircuit|true
52+
detectorFindNullDeref=FindNullDeref|true
53+
detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true
54+
detectorFindOpenStream=FindOpenStream|true
55+
detectorFindPuzzlers=FindPuzzlers|true
56+
detectorFindRefComparison=FindRefComparison|true
57+
detectorFindReturnRef=FindReturnRef|true
58+
detectorFindRoughConstants=FindRoughConstants|true
59+
detectorFindRunInvocations=FindRunInvocations|true
60+
detectorFindSelfComparison=FindSelfComparison|true
61+
detectorFindSelfComparison2=FindSelfComparison2|true
62+
detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true
63+
detectorFindSpinLoop=FindSpinLoop|true
64+
detectorFindSqlInjection=FindSqlInjection|true
65+
detectorFindTwoLockWait=FindTwoLockWait|true
66+
detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true
67+
detectorFindUnconditionalWait=FindUnconditionalWait|true
68+
detectorFindUninitializedGet=FindUninitializedGet|true
69+
detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true
70+
detectorFindUnreleasedLock=FindUnreleasedLock|true
71+
detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true
72+
detectorFindUnsyncGet=FindUnsyncGet|true
73+
detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true
74+
detectorFindUselessControlFlow=FindUselessControlFlow|true
75+
detectorFormatStringChecker=FormatStringChecker|true
76+
detectorHugeSharedStringConstants=HugeSharedStringConstants|true
77+
detectorIDivResultCastToDouble=IDivResultCastToDouble|true
78+
detectorIncompatMask=IncompatMask|true
79+
detectorInconsistentAnnotations=InconsistentAnnotations|true
80+
detectorInefficientIndexOf=InefficientIndexOf|true
81+
detectorInefficientMemberAccess=InefficientMemberAccess|false
82+
detectorInefficientToArray=InefficientToArray|true
83+
detectorInfiniteLoop=InfiniteLoop|true
84+
detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true
85+
detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true
86+
detectorInitializationChain=InitializationChain|true
87+
detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true
88+
detectorInstantiateStaticClass=InstantiateStaticClass|true
89+
detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true
90+
detectorInvalidJUnitTest=InvalidJUnitTest|true
91+
detectorIteratorIdioms=IteratorIdioms|true
92+
detectorLazyInit=LazyInit|true
93+
detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true
94+
detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true
95+
detectorMethodReturnCheck=MethodReturnCheck|true
96+
detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true
97+
detectorMutableLock=MutableLock|true
98+
detectorMutableStaticFields=MutableStaticFields|true
99+
detectorNaming=Naming|true
100+
detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true
101+
detectorNumberConstructor=NumberConstructor|true
102+
detectorOptionalReturnNull=OptionalReturnNull|true
103+
detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true
104+
detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true
105+
detectorPublicSemaphores=PublicSemaphores|false
106+
detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true
107+
detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true
108+
detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true
109+
detectorRedundantInterfaces=RedundantInterfaces|true
110+
detectorRepeatedConditionals=RepeatedConditionals|true
111+
detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true
112+
detectorSerializableIdiom=SerializableIdiom|true
113+
detectorStartInConstructor=StartInConstructor|true
114+
detectorStaticCalendarDetector=StaticCalendarDetector|true
115+
detectorStringConcatenation=StringConcatenation|true
116+
detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true
117+
detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true
118+
detectorSwitchFallthrough=SwitchFallthrough|true
119+
detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true
120+
detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true
121+
detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true
122+
detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true
123+
detectorURLProblems=URLProblems|true
124+
detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true
125+
detectorUnnecessaryMath=UnnecessaryMath|true
126+
detectorUnreadFields=UnreadFields|true
127+
detectorUselessSubclassMethod=UselessSubclassMethod|false
128+
detectorVarArgsProblems=VarArgsProblems|true
129+
detectorVolatileUsage=VolatileUsage|true
130+
detectorWaitInLoop=WaitInLoop|true
131+
detectorWrongMapIterator=WrongMapIterator|true
132+
detectorXMLFactoryBypass=XMLFactoryBypass|true
133+
detector_threshold=2
134+
effort=default
135+
filter_settings=Medium|BAD_PRACTICE,CORRECTNESS,EXPERIMENTAL,MT_CORRECTNESS,PERFORMANCE,STYLE|false|15
136+
filter_settings_neg=MALICIOUS_CODE,SECURITY,NOISE,I18N|
137+
run_at_full_build=true

trunk/src/main/java/com/google/gcloud/datastore/CompleteKey.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public Object getNameOrId() {
7474
return leaf.hasId() ? leaf.getId() : leaf.getName();
7575
}
7676

77+
public Key toKey() {
78+
return key;
79+
}
80+
7781
@Override
7882
public String toString() {
7983
return key.toString();
@@ -91,4 +95,10 @@ public boolean equals(Object other) {
9195
}
9296
return key.equals(((CompleteKey) other).key);
9397
}
98+
99+
// TODO (here and in key - also consider for Properties):
100+
// 1) cloneable
101+
// 2) serializable (or externalizable)
102+
// 3) toBuilder (and builder supports clear,...)
103+
// 4) Builder accept builder
94104
}

trunk/src/main/java/com/google/gcloud/datastore/DatastoreService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ public interface DatastoreService {
66

77
DatastoreServiceOptions getOptions();
88

9-
CompleteKey put(Key key, Map<String, Value> values);
9+
CompleteKey put(Key key, Map<String, Property> values);
1010

11-
Map<String, Value> get(CompleteKey key);
11+
Map<String, Property> get(CompleteKey key);
1212

1313
void delete(CompleteKey... key);
1414

trunk/src/main/java/com/google/gcloud/datastore/DatastoreServiceImpl.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.google.gcloud.datastore;
22

3+
import java.util.Map;
4+
35
final class DatastoreServiceImpl implements DatastoreService {
46

57
private final DatastoreServiceOptions options;
@@ -8,4 +10,28 @@ final class DatastoreServiceImpl implements DatastoreService {
810
this.options = options;
911
}
1012

13+
public DatastoreServiceOptions getOptions() {
14+
// TODO Auto-generated method stub
15+
return null;
16+
}
17+
18+
public CompleteKey put(Key key, Map<String, Property> values) {
19+
// TODO Auto-generated method stub
20+
return null;
21+
}
22+
23+
public Map<String, Property> get(CompleteKey key) {
24+
// TODO Auto-generated method stub
25+
return null;
26+
}
27+
28+
public void delete(CompleteKey... key) {
29+
// TODO Auto-generated method stub
30+
31+
}
32+
33+
public void allocateIds(Key... key) {
34+
// TODO Auto-generated method stub
35+
36+
}
1137
}
Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
11
package com.google.gcloud.datastore;
22

3+
import com.google.api.services.datastore.DatastoreV1.Value.Builder;
34
import com.google.common.collect.ImmutableMap;
45

56
import java.util.Map;
67

7-
public class KeyMapValue extends Value {
8+
public class KeyMapValue extends Property {
89

910
private final Key key;
10-
private final ImmutableMap<String, Value> values;
11+
private final ImmutableMap<String, Property> values;
12+
13+
static final Provider<KeyMapValue> PROVIDER = new Provider<KeyMapValue>() {
14+
@Override
15+
KeyMapValue get(com.google.api.services.datastore.DatastoreV1.Value proto, boolean indexed,
16+
Integer meaning) {
17+
// TODO: implement
18+
return new KeyMapValue(indexed);
19+
}
20+
};
1121

1222
KeyMapValue(boolean indexed) {
13-
super(Type.
23+
super(Type.KEY_MAP_VALUE, indexed, 0);
24+
key = null;
25+
values = null;
1426
// TODO Auto-generated constructor stub
1527
}
1628

1729
public Key getKey() {
1830
return key;
1931
}
2032

21-
public Map<String, Value> getValues() {
33+
public Map<String, Property> getValues() {
2234
return values;
2335
}
36+
37+
@Override
38+
protected void addValueToProto(Builder builder) {
39+
// TODO Auto-generated method stub
40+
}
2441
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package com.google.gcloud.datastore;
2+
3+
import com.google.api.services.datastore.DatastoreV1.Value;
4+
5+
public final class NullProperty extends Property {
6+
7+
static final Provider<NullProperty> PROVIDER = new Provider<NullProperty>() {
8+
@Override
9+
NullProperty get(Value proto, boolean indexed, Integer meaning) {
10+
return new NullProperty(indexed, meaning);
11+
}
12+
};
13+
14+
public static class Builder extends Property.Builder<NullProperty> {
15+
16+
public Builder() {
17+
super(Type.NULL);
18+
}
19+
20+
@Override
21+
public NullProperty build() {
22+
return new NullProperty();
23+
}
24+
}
25+
26+
public NullProperty() {
27+
this(true);
28+
}
29+
30+
public NullProperty(boolean indexed) {
31+
this(indexed, null);
32+
}
33+
34+
public NullProperty(boolean indexed, Integer meaning) {
35+
super(Type.NULL, indexed, meaning);
36+
}
37+
38+
@Override
39+
protected void addValueToProto(Builder builder) {
40+
// set nothing
41+
}
42+
}

trunk/src/main/java/com/google/gcloud/datastore/NullValue.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)